package edu.ustc.iproject.service.impl;

import java.util.List;

import edu.ustc.iproject.dao.CompanyDAO;
import edu.ustc.iproject.dao.NotesDAO;
import edu.ustc.iproject.dao.impl.CompanyDAOImpl;
import edu.ustc.iproject.dao.impl.NotesDAOImpl;
import edu.ustc.iproject.bean.Notes;
import edu.ustc.iproject.service.NotesService;

public class NotesServiceImpl implements NotesService {

	public Notes getSingleNoteById(int note_id) {
		
		NotesDAO noteDAO = new NotesDAOImpl();
		return noteDAO.getSingleNoteById(note_id); 
		
	}

	public List<Notes> listAllNotes() {
   
		NotesDAO noteDAO = new NotesDAOImpl();
		return noteDAO.listAllNotes();
	}

	public void removeNote(int note_id) {
		NotesDAO noteDAO = new NotesDAOImpl();
		noteDAO.removeNote(note_id);
		
	}

	public void saveNote(Notes note) {
		NotesDAO noteDAO = new NotesDAOImpl();
		noteDAO.saveNote(note);
		
	}

	public void updateNote(Notes note) {
		NotesDAO noteDAO = new NotesDAOImpl();
		noteDAO.updateNote(note);
		
	}

}
